import request from '@/utils/request'
import { path_platform, path_admin, relative_path } from '@/api/gateway'

export function getDict(data) {
  return request({
    url: path_platform + '/dict/getDictList',
    method: 'get',
    params: data,
  })
}

// 文件上传
export function uploadFile(data) {
  return request({
    url: path_platform + '/file/uploadFile',
    method: 'put',
    data: data,
  })
}

// 联系方式
export function getContacts(data) {
  return request({
    url: path_platform + '/consult/getContacts',
    method: 'get',
    params: data,
  })
}

// 获取领域数据
export function getNameList(data) {
  return request({
    url: path_platform + '/domain/getNameList',
    method: 'get',
    params: data,
  })
}

export function getDictionary(data) {
  return request({
    url: path_platform + '/dict/getDictList',
    method: 'get',
    params: data,
  })
}

export function getBannerList(data) {
  return request({
    url: path_platform + '/banner/getBannerList',
    method: 'get',
    params: data,
  })
}
export function getCategoryList(data) {
  return request({
    url: path_platform + '/category/getCategoryList',
    method: 'get',
    params: data,
  })
}
export function getNavigationList(data) {
  return request({
    url: path_platform + '/navigation/getNavigationList',
    method: 'get',
    params: data,
  })
}

export function getUserToken(data) {
  return request({
    url: path_platform + '/user/getUserToken',
    method: 'get',
    params: data,
  })
}

export function getVersionJson(data) {
  return request({
    url: relative_path + '/version.json',
    method: 'get',
    params: data,
  })
}
